package com.gitee.wsl.doc.prosemirror.model.fragment.ext

import com.gitee.wsl.doc.prosemirror.model.fragment.Fragment

fun Fragment.contentAt(depth: Int): Fragment {
    var fragment = this
    for (i in 0 until depth) {
        fragment = fragment.firstChild!!.content
    }
    return fragment
}
